using System;
using System.Collections.Generic;
using System.Text;

namespace PokerLearner.Poker
{
	public enum Position
	{
		Normal,
		SmallBlind,
		BigBlind,		
		Dealer
	}

	[Serializable]
	public class Record
	{
		private int identifier;
		public int Identifier
		{
			get { return identifier; }
			internal set { identifier = value; }
		}

		private Position position;
		public Position Position
		{
			get { return position; }
			internal set { position = value; }
		}

		private int numPlayers;
		public int NumPlayers
		{
			get { return numPlayers; }
			internal set { numPlayers = value; }
		}

		private int numPlayersFlop;
		public int NumPlayersFlop
		{
			get { return numPlayersFlop; }
			internal set { numPlayersFlop = value; }
		}

		private int numPlayersTurn;
		public int NumPlayersTurn
		{
			get { return numPlayersTurn; }
			internal set { numPlayersTurn = value; }
		}

		private int numPlayersRiver;
		public int NumPlayersRiver
		{
			get { return numPlayersRiver; }
			internal set { numPlayersRiver = value; }
		}

		private List<Play> preFlopPlays;
		public List<Play> PreFlopPlays
		{
			get { return preFlopPlays; }
			internal set { preFlopPlays = value; }
		}

		private List<Play> flopPlays;
		public List<Play> FlopPlays
		{
			get { return flopPlays; }
			internal set { flopPlays = value; }
		}

		private List<Play> turnPlays;
		public List<Play> TurnPlays
		{
			get { return turnPlays; }
			internal set { turnPlays = value; }
		}

		private List<Play> riverPlays;
		public List<Play> RiverPlays
		{
			get { return riverPlays; }
			internal set { riverPlays = value; }
		}

		private Hand preFlopHand;
		public Hand PreFlopHand
		{
			get { return preFlopHand; }
			internal set { preFlopHand = value; }
		}

		private Hand flopHand;
		public Hand FlopHand
		{
			get { return flopHand; }
			internal set { flopHand = value; }
		}

		private Hand flopCommonHand;
		public Hand FlopCommonHand
		{
			get { return flopCommonHand; }
			internal set { flopCommonHand = value; }
		}

		private Hand turnHand;
		public Hand TurnHand
		{
			get { return turnHand; }
			internal set { turnHand = value; }
		}

		private Hand turnCommonHand;
		public Hand TurnCommonHand
		{
			get { return turnCommonHand; }
			internal set { turnCommonHand = value; }
		}

		private Hand riverHand;
		public Hand RiverHand
		{
			get { return riverHand; }
			internal set { riverHand = value; }
		}

		private Hand riverCommonHand;
		public Hand RiverCommonHand
		{
			get { return riverCommonHand; }
			internal set { riverCommonHand = value; }
		}

		private int value;
		public int Value
		{
			get { return value; }
			internal set { this.value = value; }
		}

		public bool Win
		{
			get { return value >= 0; }
		}

		public static int FindTotalPlayValue(List<Play> plays)
		{
			int total = 0;
			foreach (Play play in plays)
				total += play.Value;
			return total;
		}
	}
}
